import axios from "@/plugins/api.request";

/**
 * 登录
 * @param {username} 账户名称 
 * @param {password} 密码 
 * @returns 
 */
export const login = ({username,password}) => {
    const data = {
        userAccount: username,
        password
    }
    return axios.request({
        url: 'center/login',
        data,
        method: 'post' 
    })
}

/**
 * 登出
 * @returns 
 */
export const logout = () => {
    return axios.request({
        url: 'center/logout',
        method: 'post'
    })
}